package com.retrozelda.nyanimals;

import android.graphics.RectF;

import com.retrozelda.nyanimals.INyanObject.Type;


public class CGarbage extends CRectangle
{
	
	@Override
	public Object clone()
	{
		CBackdrop ret = (CBackdrop)super.clone();
		
		
		
		return ret;
	}
	
	@Override
	public void Init(NyanimalGLSurfaceView game)
	{
		super.Init(game);
		
		m_Texture = CTextureManager.GetInstance().LoadTexture(R.drawable.trashcan, game);
		SetSize();
		
		int nDivisor = 3;
		int[] nSize = GetSize();
		SetSize(nSize[0] / nDivisor, nSize[1] / nDivisor);
		SetPosition((int)((float)game.getWidth() - (float)nSize[0]), (int)((float)game.getHeight() - (float)(nSize[1] / nDivisor)));
	}

	
	@Override
	public void Update(float deltaTime)
	{
	}
	
	@Override
	public void Draw(CArgumentGroup arg)
	{
		super.Draw(arg);
	}
	
	@Override
	public void HandleCollision(INyanObject other, RectF overlap)
	{
		super.HandleCollision(other, overlap);
		
		switch(other.GetType())
		{
		case FOOD:
			CFood food = (CFood)other;
			if(food.IsDragging() == false)
			{
				// delete food
				food.SetObjectStatus(ObjStatus.DELETE);
			}
			break;
		default:
			break;
		};
		
	}

	@Override
	public Type GetType() 
	{
		// TODO Auto-generated method stub
		return Type.NYANIMAL;
	}
}
